﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Shell.Structure
{
    public class Sequence
    {
        public string Caption { get; set; }
        public List<ConditionDef> Condition { get; set; }
        public List<Condition> EnableCondition { get; set; }

        public GCDSubSequence GcdSequence { get; set; }
        public NonGCDSubSequence NonGcdSequence { get; set; }

        public Sequence()
        {
            Condition = new List<ConditionDef>();
            EnableCondition = new List<Condition>();
        }

        public bool IsPassed()
        {
            for (int i = 0; i < EnableCondition.Count; i++)
            {
                if (!EnableCondition[i].IsPassed())
                {
                    return false;
                }
            }
            return true;
        }
    }
}
